<%@ page language="java" contentType="text/html; charset=ISO-8859-1"
pageEncoding="ISO-8859-1"%>
<%@ taglib prefix="f" uri="http://java.sun.com/jsf/core"%>
<%@ taglib prefix="h" uri="http://java.sun.com/jsf/html"%>
<!DOCTYPE html PUBLIC "-//W3C//DTD HTML 4.01 Transitional//EN" "http://www.w3.org/TR/html4/loose.dtd">
<html>
<head>
<meta http-equiv="Content-Type" content="text/html; charset=ISO-8859-1">
<title>Insert title here</title>
</head>
<body>
<f:view>
<h:outputText value="#{view.locale.displayName}"/>
<b> <h:outputText value="#{msg.user_details_form}">
</h:outputText> </b>
<p><h:messages style="color: blue" /></p>
<h:form id="userDetailsForm">
<h:commandLink action="#{languageDetails.doSetEnglishLocale}" immediate="true">
<h:graphicImage value="/images/en_flag.png" style="border: 0px"/>
</h:commandLink>
<h:commandLink action="#{languageDetails.doSetFrenchLocale}" immediate="true">
<h:graphicImage value="/images/fr_flag.png" style="border: 0px"/>
</h:commandLink>
   <h:panelGrid columns="2">
      <h:outputText value="#{msg.name}"></h:outputText>
      <h:inputText id="name" value="#{userDetails.name}" required="true"
          requiredMessage="#{msg.enter_name}"
          validatorMessage="#{msg.enter_name_validlength}">
         <f:validateLength minimum="3" />
      </h:inputText>
      <h:outputText value="#{msg.age}"></h:outputText>
      <h:inputText id="age" value="#{userDetails.age}" required="true"
           requiredMessage="#{msg.enter_age}"
           validatorMessage="#{msg.enter_correctage}">
          <f:validateLength maximum="3" />
      </h:inputText>
       <h:outputText value="#{msg.email}"></h:outputText>
       <h:inputText id="email" value="#{userDetails.email}" required="true"
            requiredMessage="#{msg.enter_email}"></h:inputText>
       <h:outputText value="#{msg.dob}"></h:outputText>
       <h:inputText id="dob" value="#{userDetails.dob}" required="true"
            requiredMessage="#{msg.enter_dob}"
            converterMessage="#{msg.enter_dobpattern}">
           <f:convertDateTime type="date" pattern="MM/dd/yyyy" />
        </h:inputText>
</h:panelGrid>
<h:commandButton value="#{msg.submit}"
action="#{userDetails.submitUserDetails}"></h:commandButton>

</h:form>
</f:view>
</body>
</html>